-- background: 3688 from stack: in.0 -- bmap block id: 3884 -- flags: 4000 -- background id: 0 -- name: Solutions ----- HyperTalk script ----- -- HANDLERS: displayPosition, buildWindow, buildSpecWindow, showPosition, -- showSoftware, showSpecs, kWContinue, showMyStuff, -- hideMyStuff -- FUNCTIONS: machineNumber, positionText, softwareText ----------------------------------------------- -- Full Screen Windows using HyperPro’s kWindow XCMDs ----------------------------------------------- on displayPosition machine global gThisMachine put machine into gThisMachine -- for specification button set cursor to watch lock screen put cd field "TimeOut" of cd 1 into howLong put machineNumber(machine) into CPUnum if CPUnum is 0 then exit displayPosition -- in case input bad buildSpecWindow CPUnum buildWindow machine, CPUnum objects "Hide", "SoftwareText" objects "active", "Description","notActive" Windows "show",1 get Display(howLong,1,"") end displayPosition on buildWindow CPU, CPUnum -- Updated 8/13/90 to use runtime version of kWindow: -- PICTs to display in this window: put CPUnum+800 into MachinePictID put CPUnum+900 into titlePictID -- Get the text to display: put positionText(CPU) into pText put softwareText() into sText setWindow 1 Windows "recall", 1001 -- kWIN called "Position" setValue "object", "TitleBar", titlePictID setValue "object", "CPU picture", MachinePictID setValue "object", "PositionText", pText setValue "object", "SoftwareText", sText end buildWindow on buildSpecWindow CPUnum -- Figure out which PICT to display: put (CPUnum + 700) into SpecPictID setWindow 2 Windows "recall", 1002 -- kWIN called "Specs" setValue "object", "CPU Spec", SpecPictID end buildSpecWindow -- NOTE: showPosition, showSoftware, and showSpces must be defined -- no lower than at card level. on showPosition -- Message sent when "Description" button is clicked -- in the window "Instore" (window #1) KWContinue objects "active", "Description","notActive" objects "active", "Software","active" Objects "hide", "SoftwareText", "erase" Objects "show", "PositionText" end showPosition on showSoftware -- Message sent when "Software" button is clicked -- in the window "Instore" (window #1) KWContinue objects "active", "Software","notActive" objects "active", "Description","active" Objects "hide", "PositionText", "erase" Objects "show", "SoftwareText" end showSoftware on showSpecs -- Message sent when "Specifications" button is clicked -- in the window "Instore" (window #1) KWContinue Windows "show", 2 end showSpecs on KWContinue global KWCanDismiss put false into KWCanDismiss end KWContinue function machineNumber CPUName put word 2 of CPUName into CPUtype put "Classic,SE/30,LC,Portable,IIsi,IIci,IIfx" into CPUList if ("," & CPUtype & ",") is in ("," & CPUList & ",") then repeat with K = 1 to the number of items in CPUList set cursor to busy if item K of CPUList = CPUtype then return K end repeat else return 0 -- do something in this case. end machineNumber function positionText machine if line 2 of fld (machine) is empty then -- no special text get cd fld (machine) of card id 18576 -- Positions else get field (machine) end if delete line 1 of it return it end positionText function softwareText global gSoftwareList put return into softwareList put "* * *" into separator repeat with i = 1 to the number of items in gSoftwareList if item i of gSoftWareList is empty then next repeat set cursor to busy get card field (item i of gSoftwareList) of card id 17083 -- "software" -- delete line 1 of it put it after softwareList put return & separator & return & return after softwareList end repeat delete last char of softwareList return softwareList end softwareText ----------------------------------------------- -- ***** End of Instore window handlers ***** ----------------------------------------------- on showMyStuff machine --** answer "See special case or general fields?" with "Cancel" or "Special" or "General" if it is "Cancel" then exit to HyperCard if it is "Special" then repeat with i = 5 to 11 set cursor to busy do "show field" && i end repeat exit to HyperCard end if if it is "General" then go card id 18576 -- "Positions" send mouseUp to btn machine exit to HyperCard end if end showMyStuff on hideMyStuff --** repeat with i = 5 to 11 set cursor to busy do "hide field" && i end repeat end hideMyStuff -- part 1 (field) -- low flags: 81 -- high flags: 0002 -- rect: left=0 top=0 right=28 bottom=512 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 156 -- text size: 18 -- style flags: 0 -- line height: 22 -- part name: Title -- part 3 (field) -- low flags: 80 -- high flags: 0000 -- rect: left=11 top=304 right=327 bottom=49 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: index -- part 6 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=0 top=0 right=185 bottom=144 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Macintosh IIsi ----- HyperTalk script ----- on mouseUp hideMyStuff end mouseUp -- part 7 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=0 top=184 right=342 bottom=144 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Macintosh LC ----- HyperTalk script ----- on mouseUp hideMyStuff end mouseUp -- part 8 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=143 top=183 right=342 bottom=266 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 21 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Macintosh Classic ----- HyperTalk script ----- on mouseUp hideMyStuff end mouseUp -- part 13 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=265 top=184 right=342 bottom=384 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 21 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Macintosh Portable ----- HyperTalk script ----- on mouseUp hideMyStuff end mouseUp -- part 14 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=144 top=0 right=185 bottom=265 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 21 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Macintosh SE/30 ----- HyperTalk script ----- on mouseUp hideMyStuff end mouseUp -- part 15 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=265 top=0 right=185 bottom=384 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 21 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Macintosh IIci ----- HyperTalk script ----- on mouseUp hideMyStuff end mouseUp -- part 16 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=383 top=0 right=185 bottom=512 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 21 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Macintosh IIfx ----- HyperTalk script ----- on mouseUp hideMyStuff end mouseUp -- part 20 (button) -- low flags: 00 -- high flags: C002 -- rect: left=0 top=325 right=342 bottom=171 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Return to Main Menu ----- HyperTalk script ----- on mouseUp go card "Main menu" end mouseUp -- part 21 (button) -- low flags: 00 -- high flags: C002 -- rect: left=172 top=325 right=342 bottom=384 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Return to Previous Screen ----- HyperTalk script ----- on mouseUp global InstoreReturnPath lock screen go cd InstoreReturnPath end mouseUp